package net.sk.china.common.constants;

/**
 * 通用配置类
 * +----------------------------------------------------------------------
 * | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2018-2024 聊来All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * +----------------------------------------------------------------------
 * | @Author: 聊来 <18970881148@qq.com>
 * +----------------------------------------------------------------------
 * | DateTime: 2024/6/2 11:49
 * +----------------------------------------------------------------------
 */
public class Constants {

    /** 令牌有效期 一个星期 */
    public static final long TOKEN_EXPRESS_MINUTES = 10080;

    /** 用户登录token redis存储前缀 */
    public static final String USER_TOKEN_REDIS_KEY_PREFIX = "TOKEN_USER:";

    /** 总后台登录Redis 存储的key */
    public static final String ADMIN_TOKEN_REDIS_KEY_PREFIX = "TOKEN_ADMIN:";


    /** 默认分页 */
    public static final int DEFAULT_PAGE = 1;

    /** 默认每页显示条数 */
    public static final int DEFAULT_LIMIT = 20;

    /** 导出最大数值 */
    public static final Integer EXPORT_MAX_LIMIT = 99999;

    /** 头部 token令牌key */
    public static final String HEADER_AUTHORIZATION_KEY = "Authorization";

    /** 状态码标识 */
    public static final String RESULT_CODE = "code";

    /** 状态码消息 */
    public static final String RESULT_MESSAGE = "message";

    /** 返回的数据 */
    public static final String RESULT_DATA = "data";

    /** 数字 */
    public static final Integer NUM_ZERO = 0;
    public static final Integer NUM_ONE = 1;

    public static final Integer NUM_SEVEN = 7;
    public static final Integer NUM_TEN = 10;
    public static final Integer NUM_ONE_HUNDRED = 100;
    public static final Integer NUM_TWO_HUNDRED = 200;


    //------------------------------------------- 日期相关配置 ------------------------------------------------------------

    public static final String DATE_FORMAT_YEAR = "yyyy";
    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final String DATE_FORMAT_DATE = "yyyy-MM-dd";
    public static final String DATE_FORMAT_START = "yyyy-MM-dd 00:00:00";
    public static final String DATE_FORMAT_END = "yyyy-MM-dd 23:59:59";
    public static final String DATE_FORMAT_START_PEREND = "00:00:00";
    public static final String DATE_FORMAT_END_PEREND = "23:59:59";
    public static final String DATE_TIME_FORMAT_NUM = "yyyyMMddHHmmss";


    /** 今天 */
    public static final String SEARCH_DATE_DAY = "today";
    /** 昨天 */
    public static final String SEARCH_DATE_YESTERDAY = "yesterday";
    /** 最近7天 */
    public static final String SEARCH_DATE_LATELY_7 = "lately7";
    /** 最近30天 */
    public static final String SEARCH_DATE_LATELY_30 = "lately30";
    /** 本周 */
    public static final String SEARCH_DATE_WEEK = "week";
    /** 上周 */
    public static final String SEARCH_DATE_PRE_WEEK = "preWeek";
    /** 本月 */
    public static final String SEARCH_DATE_MONTH = "month";
    /** 上月 */
    public static final String SEARCH_DATE_PRE_MONTH = "preMonth";
    /** 本年 */
    public static final String SEARCH_DATE_YEAR = "year";
    /** 上一年 */
    public static final String SEARCH_DATE_PRE_YEAR = "preYear";

    public static final String FAIL     = "FAIL";
    public static final String SUCCESS  = "SUCCESS";
    public static final String FIELD_SIGN = "sign";

    /** 快递信息缓存 */
    public static final String LOGISTICS_KEY = "logistics_";

    /** 快递查询密钥 */
    public static final String CONFIG_KEY_LOGISTICS_APP_CODE = "system_express_app_code";

    public static String LOGISTICS_API_URL = "https://wuliu.market.alicloudapi.com/kdi";

    /** config表数据redis */
    public static final String CONFIG_LIST = "config_list";

    //------------------------------------------- 支付相关配置 ------------------------------------------------------------
    /** 微信支付接口请求地址 */
    public static final String WX_PAY_API_URL = "https://api.mch.weixin.qq.com/";
    /** 微信统一预下单 */
    public static final String WX_PAY_API_URI = "pay/unifiedorder";
    /** 支付方式 - 微信支付 */
    public static final String PAY_TYPE_WECHAT = "weixin";
    /** H5唤起微信支付 */
    public static final String PAY_CHANNEL_WE_CHAT_H5 = "h5";
    /** 公众号 */
    public static final String PAY_CHANNEL_WE_CHAT_PUBLIC = "public";
    /** 小程序 */
    public static final String PAY_CHANNEL_WE_CHAT_PROGRAM = "routine";
    /** 微信App支付 */
    public static final String PAY_CHANNEL_WE_CHAT_APP = "app";
    /** 公众号appId */
    public static final String CONFIG_KEY_PAY_WE_CHAT_APP_ID = "pay_weixin_appid";
    /** 公众号配的商户号 */
    public static final String CONFIG_KEY_PAY_WE_CHAT_MCH_ID = "pay_weixin_mchid";
    /** 公众号支付key */
    public static final String CONFIG_KEY_PAY_WE_CHAT_APP_KEY = "pay_weixin_key";
    /** 小程序appId */
    public static final String CONFIG_KEY_PAY_ROUTINE_APP_ID = "pay_routine_appid";
    /** 小程序分配的商户号 */
    public static final String CONFIG_KEY_PAY_ROUTINE_MCH_ID = "pay_routine_mchid";
    /** 小程序支付key */
    public static final String CONFIG_KEY_PAY_ROUTINE_APP_KEY = "pay_routine_key";
    /** 微信APP支付appId */
    public static final String CONFIG_KEY_PAY_WX_APP_ID = "pay_wxapp_appid";
    /** 微信APP支付商户号 */
    public static final String CONFIG_KEY_PAY_WX_APP_MCHID = "pay_wxapp_mchid";
    /** 微信APP支付key */
    public static final String CONFIG_KEY_PAY_WX_APP_KEY = "pay_wxapp_key";
    /** 支付方式 - 支付宝 */
    public static final String PAY_TYPE_ALI_PAY = "alipay";
    /** 支付宝APP支付 appId */
    public static final String CONFIG_KEY_PAY_ALI_APP_APPID = "pay_alipayapp_appid";
    /** 支付宝APP支付 应用密钥 */
    public static final String CONFIG_KEY_PAY_ALI_APP_PRIVATE_KEY = "pay_alipayapp_private_key";
    /** 支付宝APP支付 支付宝公钥 */
    public static final String CONFIG_KEY_PAY_ALI_APP_PUBLIC_KEY = "pay_alipayapp_public_key";

    /** 前端微信支付回调地址 */
    public static final String CONFIG_WX_NOTIFY_URL = "wx_notify_url";

    /** 网站名称 */
    public static final String CONFIG_KEY_SITE_NAME = "site_name";

    /** 文件、图片上传相关 */
    public static final String UPLOAD_TYPE_IMAGE = "image";
    public static final String UPLOAD_TYPE_FILE = "file";

    //------------------------------------------- 需要支付的业务类型 ------------------------------------------------------------

    /** 订单 */
    public static final String SERVICE_PAY_TYPE_ORDER = "order";


    /** 分站账号 redis key */
    public static final String CITY_ACCOUNT = "city_account";
}
